﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using ItemStatistics.Models;


namespace ItemStatistics.ViewModels.ReciveInfoVMs
{
    public partial class ReciveInfoTemplateVM : BaseTemplateVM
    {
        public ExcelPropety Customer_Excel = ExcelPropety.CreateProperty<ReciveInfo>(x => x.CustomerId);
        public ExcelPropety Gift_Excel = ExcelPropety.CreateProperty<ReciveInfo>(x => x.GiftId);
        [Display(Name = "领取数量")]
        public ExcelPropety Number_Excel = ExcelPropety.CreateProperty<ReciveInfo>(x => x.Number);

	    protected override void InitVM()
        {
            Customer_Excel.DataType = ColumnDataType.ComboBox;
            Customer_Excel.ListItems = DC.Set<Customer>().GetSelectListItems(Wtm, y => y.Name);
            Gift_Excel.DataType = ColumnDataType.ComboBox;
            Gift_Excel.ListItems = DC.Set<Gift>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class ReciveInfoImportVM : BaseImportVM<ReciveInfoTemplateVM, ReciveInfo>
    {

    }

}
